package com.cuixk.basic.quartz.manager.bean;

import com.cuixk.basic.quartz.manager.constant.BooleanConstant;
import lombok.Data;

import java.util.Date;

/**
 * Create By Cuixk
 * 2019/6/21 14:56
 */
@Data
public class QuartzTrigger {

    private String triggerName;
    private String triggerGroup;
    private String triggerKey;
    private String triggerValue;
    private Date startAt;
    private Boolean startNow = BooleanConstant.TRUE;
    private String cronExpression;

    public Date getStartAt() {
        if (this.startNow) {
            startAt = new Date();
        }
        return startAt;
    }
}
